# coding:utf-8

import os
import set_env_path     # 请勿删除

from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker

from common.utils import redis_client
from common.constant import MARCH_WXUSERS

Base = declarative_base()
engine = create_engine(
    os.getenv('DATABASE_URL')
    or 'mysql+pymysql://root:@127.0.0.1/wph_www_prod?charset=utf8'
)
Session = sessionmaker(bind=engine)
session = Session()

mobile_list = [
    '18516183121', '15535151300', '15820342156', '18127874659', '18211260580',
    '13138571010', '15622706732', '15521379124', '13570238923', '13560522165',
    '13570246134', '13724151764', '15521159262', '13602295856', '13725499685',
    '13418084989', '13640633645',
    '13166008903', '18565413170', '13902236508', '18939560555', '18681691798',
    '13828881962', '18307033661',
    '13739511016', '13613070742', '18629078875', '13788014394', '13724940023',
    '13119670987', '15007608285',
    '18820254946', '13453721008', '17507555629', '15147461115', '13934086685',
    '13686863024', '13623619888',
    '17631610111', '13360999418', '17674922875', '13538867256', '18660322996',
    '15979753783', '13035816057',
    '15522215205', '13878599124', '18358561972', '18608646002', '13430722715',
    '18576606746', '13902449395',
    '13691866513', '18835558281', '13709243277', '17791689086', '18085290763',
    '13788288766', '18734571555',
    '18627841568', '13851803213', '15119147879', '13928107946', '15999563267',
    '13828473316', '15899625508',
    '13787085861', '13414996612', '13926539331', '18033122137', '17337915555',
    '18026554715', '13923707718',
    '13760664658', '15361476681', '13560089475', '17751269660', '13501510084',
    '13926504104', '18566327914',
    '13807919820', '13560200885', '18902851526', '13739584881', '13873186093',
    '13928880540', '15818757906',
    '15628644000', '13248395378', '18659008000', '13363086111', '15993576012',
    '18165755186', '13189066985',
    '18928407177', '13950141571', '15999578279', '18825114851', '18925204976',
    '13810905938', '13710557927',
    '13431857787', '13893656718', '13883772501', '18576689325', '13509233649',
    '13928000177', '13679746776',
    '13826237615', '13480884849', '15085327078', '13066444649', '18978827589',
    '13397619717', '13825010650',
    '13560655909', '15814733247', '13691886203', '13933184018', '15972966537',
    '15800131475', '13603449696',
    '13827400396', '15639467705', '15048198091', '18639013393', '15323618210',
    '18739491238', '13728641200',
    '13527837089', '13588299489', '13838158646', '15070127977', '13823272054',
    '13590221175', '18138855969',
    '13926464306', '17095056305', '18511084098', '15919821896', '13556667994',
    '15180332531', '15986642490',
    '15383434424', '18296688520', '13538259767', '17735845673', '13925857832',
    '17683785883', '15997878711',
    '15220177851', '13430968777', '13922880163', '15705188798', '15878768750',
    '18919060168', '15126254523',
    '18814180077', '18138811031', '18679609091', '18566219728', '13725839677',
    '13242058686', '15240425345',
    '15120882068', '13910810300', '17673044488', '15014137711', '17374533573',
    '13557367171', '18307659270',
    '13719040155', '15999611503', '18129869916', '18176536811', '13845236788',
    '18684518201', '15860481829',
    '18170465328', '13418812006', '13826187409', '18879015093', '13702919156',
    '13534282551', '18073709330',
    '13926500108', '13612908216', '13824371917', '13479050072', '18676162965',
    '13587627745', '15013844979',
    '18861260126', '13714095045', '17688729977', '13790258485', '17755331532',
    '15976839310', '13471689714',
    '15866999229', '18602640505', '18124687115', '15875982241', '18820150018',
    '18890277905', '18640598366',
    '18982493330', '18905860152', '13750095135', '15235100092', '15135081698',
    '18569451119', '13823343652',
    '18613066922', '13798274020', '13760360816', '18860164822', '18650125728',
    '13316857758', '13828840521',
    '13510554679', '18673826088', '13480620970', '18928152801', '18710572231',
    '18569368948', '18078828438',
    '18598272160', '17608339888', '13926539137', '18660197689', '15115316013',
    '13488991885', '13809730632',
    '13827113995', '18785964520', '15271111158', '18138822646', '18205156712',
    '13723425043', '13599103939',
    '18620261522', '13250465703', '13674878076', '18675011919', '13827470730',
    '13632394743', '13501585747',
    '13902483746', '13555625823', '18925943357', '18814459505', '15019954197',
    '13602632456', '13250743437',
    '13411449996', '13502778005', '18071213777', '13750059255', '18023324488',
    '18680332642', '13885186937',
    '13823452089', '18909140111', '15970707320', '13351336777', '13677007883',
    '15210550037', '18998935087',
    '13755777132', '17817468961', '15917645411', '13319270858', '13527729040',
    '15171009282', '18107086355',
    '13213053415', '17791640276', '13393012104', '13606052107', '18991999106',
    '15920961410', '18601347127',
    '18218584389', '18681871971', '13798543978', '13510925054', '18565679071',
    '18121914378', '15898480178',
    '15598388869', '18686148674', '18640111023', '13691994506', '15530656891',
    '15588611930', '15599108800',
    '13798501636', '13826152424', '13195267771', '15815500881', '13590482950',
    '15088131469', '13646520844',
    '13928858674', '13579946290', '13715212481', '18127763052', '13927995395',
    '13925052877', '13802552101',
    '13834831358', '13907840200', '18576765237', '13083008301', '18637388680',
    '18189827916', '18080982600',
    '17600968658', '18907160610', '13431635626', '13825263502', '13922431549',
    '13534174417', '13421323691',
    '13825871532', '18013913111', '13928841208', '18789844592', '15184463446',
    '18382487366', '13728744708',
    '13827150624', '18027169112', '15832095555', '13925516103', '13760309099',
    '13410228436', '13510931653',
    '13286078516', '18665375882', '18617123681', '13976940799', '18603014598',
    '13538179291', '15895056072',
    '15189750981', '15301982197', '18976226985', '15008918115', '13714287703',
    '13751602182', '18677454107',
    '13880216477', '13714501552', '13549921488', '18316973351', '13600186758',
    '18636717220', '18530823600',
    '13728257535', '13880277296', '18902857930', '18625788163', '13694376668',
    '15394415986', '18973582988',
    '18666383136', '15067505035', '15889690078', '17012362983', '13958026280',
    '15889933446', '18581319474',
    '13376669681', '17688982790', '13539365252', '18943101666', '13576539522',
    '13318855667', '13938580590',
    '15518066166', '18603005576', '15348299957', '15994766025', '13560739753',
    '13925530662', '13825671566',
    '15999681305', '13430835300', '18126114956', '13802378418', '18733609821',
    '18798431418', '18985771859',
    '13546515945', '15656561159', '18977588220', '13823667816', '15989537958',
    '13556003497', '18677216806',
    '15177733730', '18677089489', '15878919382', '13321633328', '18718888688',
    '15559518439', '18093667666',
    '13602883656', '13268059640', '18977136028', '15323850668', '15920065404',
    '13532365566', '13662696640',
    '13350360104', '13703210759', '18626281011', '13632939775', '15989495331',
    '15768352445', '13812653275',
    '13688586085', '18975185828', '15200668080', '18200859156', '18964796703',
    '15647394666', '15810105572',
    '18022311873', '13653680598', '17727941132', '13922841918', '17688703271',
    '18907004890', '13145738299',
    '18922277261', '13714894552', '13828878704', '13709610149', '17705955909',
    '15989382523', '18316993361',
    '18376965053', '18260015911', '13510168256', '18928925567', '15964113386',
    '13980719288', '18617140782',
    '13410788528', '15019494409', '18635254647', '18627022881', '13760683186',
    '15521216798', '13875245553',
    '13638913433', '18977230540', '13910029229', '15361060489', '15180435806',
    '17076720855', '13975448370',
    '13922249795', '18870262539', '18826244902', '13922302270', '17605923683',
    '13380001579', '13829263826',
    '13388828126', '13925524517', '13217268335', '13728720294', '17720928588',
    '18669251761', '18910528895',
    '13871669908', '18682340709', '15876316944', '15118084018', '13574392403',
    '18655695251', '17388933891',
    '18319039964', '13922817318', '18682405616', '13719600001', '15390487868',
    '18505266444', '18777328811',
    '15093745700', '13580422885', '13526691676', '13922530878', '15926656955',
    '13430094040', '18973770177',
    '13070207514', '13510403377', '15053125895', '13790390302', '18948346102',
    '15091588810', '13322067555',
    '18938034403', '13910477267', '13527760030', '13985161578', '18971590168',
    '18867956797', '15089375373',
    '15195936601', '15829327678', '18588578509', '15999451486', '18823470824',
    '17636373652', '18135567788',
    '18025692116', '18028354388', '15914144291', '15093161612', '15837119989',
    '13077825094', '13312906156',
    '13316263432', '18617105792', '18198123863', '13360693250', '18123913106',
    '13934595643', '13035531361',
    '15008986081', '13590191110', '13510486345', '13580292332', '18382189817',
    '18380123567', '18681568226',
    '18601118882', '13836842234', '18698605233', '15377666090', '15009898988',
    '18841182328', '13904272112',
    '15932016395', '15950228572', '13302267575', '13660666313', '13268368273',
    '13316838689', '17374473888',
    '13510502931', '18941285550', '15254026288', '18640437011', '13700083503',
    '18960086177', '14794854816',
    '13925111120', '17642022021', '15180818103', '17665378282', '17600698275',
    '18926510968', '18676681249',
    '13616868658', '18665917565', '13065276521', '15015770580', '18826272195',
    '13430286314', '18706774884',
    '18813291199', '15622073665', '18520534074', '13202448413', '13710376831',
    '18820697172', '17576061582',
    '18620275660', '13539469258', '15768422635', '15986278874', '13529249372',
    '13682502558', '17390086566',
    '18842595954', '15383191931', '18923434516', '13536503958', '13659123977',
    '18923434524', '13528450584',
    '15017560001', '18569979187', '13823745796', '13450383705', '13477309395',
    '13707076171', '15828198104',
    '18682299278', '13603072561', '13707651000', '18078821449', '18823716286',
    '13625529715', '18352954702',
    '13891639011', '13610139643', '13927618999', '18789245750', '15588149222',
    '18607630600', '18169699998',
    '13299087681', '15831972060', '13560732292', '13827233247', '18924985899',
    '15112309120', '13488058588',
    '13711976286', '18928727586', '18661326520', '13807238858', '13925085048',
    '13590273037', '13829701941',
    '18073109008', '13790287058', '13822102657', '18978810158', '13702741976',
    '13377225453', '13379012700',
    '13688718800', '13975582912', '13835194446', '18307601362', '13826044775',
    '13172981868', '15908301314',
    '13698785200', '13192961478', '13318310199', '13416900009', '18680310868',
    '13687719816', '18790657435',
    '13510150024', '18823348318', '18960404850', '13976666001', '13858885125',
    '18520485838', '13902467222',
    '13702103596', '18334753608', '13826516924', '13860129101', '18975562398',
    '18906000871', '13790312651',
    '15962944383', '13935111184', '13450668506', '13708803819', '13888488828',
    '13380938880', '13510392071',
    '15157848800', '18988628336', '13266267859', '15875347260', '17304518886',
    '18911447183', '18002553180',
    '13001166520', '18275402180', '15097122617', '18785918969', '13606900990',
    '13824446510', '18070117360',
    '13622579233', '15220197737', '17620089580', '13823214788', '18311529246',
    '13877576249', '18942345777',
    '18172804226', '18653353385', '18577175242', '13332822992', '15986600335',
    '17328557375', '18977709995',
    '18719048536', '13620972687', '18813282844', '18562861777', '18688956911',
    '13190015999', '18102747502',
    '18666931323', '18925271698', '13062521039', '13543065702', '17512075219',
    '18182609880', '18404986307',
    '13726483326', '15899880941', '15908930808', '17736939252', '13068883505',
    '13571089478', '18766303789',
    '13651473583', '13812860248', '18300432917', '15999939893', '15955952790',
    '15156993293', '13909464869',
    '13068562349', '15913437401', '18814143436', '13958168416', '18802111811',
    '18370287063', '13831231665',
    '13712225659', '15260965028', '13590404060', '13712686390', '17620823722',
    '13100050886', '18032010156',
    '13692229602', '18636233798', '15735284012', '13086776666', '13844053218',
    '13725709218', '15321116515',
    '18729297083', '13582266639', '13590230218', '15989953223', '13536884171',
    '13925031845', '15112653657',
    '18576813808', '13908018995', '18344085971', '13922289601', '13889907575',
    '13684988499', '18589028719',
    '13054495669', '15013460575', '18983933983', '13802891124', '18039276257',
    '15889616676', '15019469530',
    '15101207706', '13822413362', '15919826631', '15138667078', '18638025818',
    '15012706727', '18697332170',
    '13996070492', '13356565788', '17080954176', '18007726977', '18929356727',
    '15817544882', '13580029600',
    '13087720192', '13924214993', '17707807970', '13928720136', '18256479199',
    '13973787061', '18603078009',
    '13878811761', '13790639595', '13907834455', '18600052356', '13714323566',
    '15348895343', '13537185372',
    '18040790369', '13528487343', '15219430800', '18824174960', '13902961915',
    '13923847770', '15824127776',
    '13804733766', '13788207790', '13975455685', '13480889496', '13511919098',
    '13902978314', '17620445306',
    '13924837488', '13570394307', '17317767770', '13603516764', '13424108433',
    '15994802634', '13631069611',
    '15813272028', '13751887781', '18683576249', '18605319982', '18680391145',
    '18607612525', '18676751153',
    '15112636530', '13576784666', '13926394758', '13897282731', '15915359749',
    '18279873297', '15813141479',
    '13066825031', '18641120509', '18011978500', '13923461349', '13570919501',
    '13867157009', '15588851525',
    '13651978207', '15017930347', '13536368666', '13337835586', '13609736378',
    '13829771211', '15269911618',
    '13715174297', '13926575641', '13598863856', '13052172840', '13154717888',
    '18175114566', '13057703158',
    '13015220344', '13938476905', '13580646688', '18814249295', '15874888864',
    '18566583397', '13005421191',
    '13902901125', '13502883746', '13664340212', '13286089294', '13824317655',
    '18677990200', '13070200011',
    '18087866625', '13807542555', '13178948196', '15657820227', '13257660551',
    '18676692848', '13173652241',
    '18319036282', '15554116082', '15019280651', '18038652348', '13156121559',
    '13416265660', '13834556839',
    '13609717335', '15820616696', '13871075715', '15999910589', '18666002373',
    '18932862860', '18610059750',
    '18923434522', '13027941035', '15351281522', '15110999229', '13893753348',
    '18665936212', '18919808777',
    '13985517118', '13570889802', '18688464842', '18688410297', '15864255320',
    '18602025462', '15296313865',
    '15360084303', '18326181886', '13533727781', '18656456050', '13966849619',
    '15602917703', '13615518585',
    '13615879927', '15573182193', '15307958730', '13330155377', '15220886037',
    '13751462756', '18688096368',
    '13922876521', '13818293428', '13631325090', '13905583073', '15003895222',
    '13616897017', '15856393804',
    '13963116355', '15959555961', '13802507122', '13311308359', '13510875969',
    '18012114888', '18142004394',
    '18926226585', '18309695559', '18588611675', '18993958060', '18976206235',
    '13977112049', '13950207600',
    '15120883445', '13533266900', '17373514930', '15976000638', '13883183933',
    '18088882876', '18520699857',
    '13728783375', '18911186625', '13689581195', '15920559356', '13265043773',
    '13025966668', '13348072911',
    '15805169294', '15013268123', '18903884388', '18820152712', '18773033802',
    '15601974866', '18677249951',
    '15887287521', '13737570919', '13905106423', '17761629393', '13530825580',
    '18608403775', '13008140000',
    '18924642796', '15529975860', '13428754605', '17660451073', '18382823082',
    '13553035545', '13755136966',
    '15855111956', '15015088441', '13901083857', '13975816888', '15916276661',
    '13625312222', '15114580726',
    '18056001649', '13612209965', '15999976643', '13888420361', '15181260386',
    '18813951458', '13924451554',
    '18147775683', '13990180182', '13314414664', '17398067062', '13826026691',
    '18609710126', '13530228787',
    '13760672041', '18929388941', '15622205927', '15799061366', '15685390999',
    '18585000575', '13715580016',
    '18798123686', '13571748267', '15535505926', '18535598955', '13929965133',
    '13073018375', '13421388781',
    '18620560395', '13591820266', '13602439576', '15094683192', '15300056676',
    '18038019591', '13978775616',
    '18288907797', '15071031005', '13132705806', '13925393915', '18607789366',
    '13480931621', '13620396405',
    '13897645123', '13682635362', '18954375167', '13577128604', '13987692059',
    '13823172565', '13080506111',
    '13799799967', '15506531053', '18008454577', '17322314685', '15770900379',
    '13602538411', '13690518803',
    '15572740888', '15020301488', '13950121401', '13306500530', '18979723058',
    '15919927218', '15636100876',
    '13822272509', '18988443696', '13333490004', '18507220908', '18684759383',
    '13751002479', '13528258867',
    '15197760068', '13318845413', '13819769591', '18787092608', '18679781864',
    '18388399452', '13909515675',
    '15349982938', '13532985353', '13082201770', '13260921219', '18529471888',
    '18666711560', '13510332216',
    '13502459260', '17303135557', '18102163602', '18520046860', '18950622899',
    '13798823586', '13411782490',
    '13544535167', '13481009071', '13418878770', '17304423363', '13544374576',
    '13098801403', '18589065498',
    '18948717236', '18611717753', '18700126233', '15915353025', '18608776188',
    '13247573605', '17612030510',
    '17681698761', '18632888775', '15521180339', '17620996631', '18011292637',
    '18073962188', '18530083206',
    '13610225389', '13424343355', '13621798098', '13433613028', '18963295506',
    '18925279329', '13590236307',
    '18789556240', '18079744517', '18120873289', '18978942261', '18142871557',
    '18707663666', '15088138228',
    '15817181915', '13533021120', '13535573881', '13802731886', '13585911204',
    '13926266651', '13727381789',
    '15876336110', '15099933691', '13802625265', '13544199515', '18697197690',
    '18028752073', '18038068559',
    '15099906356', '13599988686', '18629294601', '13522704509', '18877323288',
    '13899862226', '13177460397',
    '13425599932', '13686999725', '13760498108', '13875918232', '15521062573',
    '15075259434', '13713955919',
    '18033425591', '18588246321', '15113631314', '13360731314', '13547060998',
    '13001158359', '13519593440',
    '13684787179', '13438165828', '13450291583', '17355872127', '15303762631',
    '18676650210', '18088278720',
    '13889263456', '15635594547', '17716510309', '18631124775', '13008010188',
    '13303480868', '15218405486',
    '18588785971', '13060844873', '15705061983', '13535465644', '15913124528',
    '13662287210', '13686749660',
    '18028775999', '13480809110', '18970888044', '13435332134', '17756181569',
    '15705612230', '13089687195',
    '18928140686', '13642706108', '13693778820', '18370494037', '18520297605',
    '13480631906', '13755497170',
    '15918423216', '18988542290', '13543617415', '13531736244', '13428500984',
    '18002561702', '15013652990',
    '13823164905', '13823292694', '18026915704', '18818795341', '13607383437',
    '15697558878', '13480747126',
    '13714924184', '18971205957', '15260649352', '17707746434', '18172509824',
    '15112386934', '15814743106',
    '13902553882', '15999581504', '15958970225', '18513086983', '13047790566',
    '18124283230', '13750265559',
    '15876238841', '13925051085', '17688994993', '18670376895', '18507610505',
    '17310892472', '18565749658',
    '13413166949', '15338551709', '18606112255', '18079736655', '13760631229',
    '18682178403', '15622710741',
    '17727309938', '17608455156', '18677318822', '13822262990', '13060682523',
    '15920652088', '18907380720',
    '13862043715', '13632308702', '18939571889', '15766568803', '13663005580',
    '13950305637', '13926276682',
    '15815847772', '18575652232', '15820245657', '13347250930', '15875573553',
    '18988848577', '18370713210',
    '18665948612', '13510545358', '15367688999', '18008470053', '13246762582',
    '13534190492', '18520784288',
    '13901994080', '17791471817', '13860025479', '18616710531', '18503059062',
    '17765285925', '13691657640',
    '13608990230', '18129907850', '15913733443', '13612850743', '13570368141',
    '13377531727', '18926538590',
    '13688814510', '18919377922', '15384716784', '13726685832', '13877470869',
    '15919187668', '13888282921',
    '13837846207', '18729360231', '13327408330', '13971380300', '13994254331',
    '13686827812', '18819812911',
    '18988424202', '13554800443', '13794092621', '13998074678', '13529797707',
    '18826950881', '15999719183',
    '13072870193', '18823354323', '18926577716', '18188229679', '13717094664',
    '13948534036', '13662777473',
    '18813790523', '15612222263', '13310865436', '13825269201', '18928485528',
    '13825265603', '13528794008',
    '13559145663', '15818785425', '13682372529', '15989390544', '13974228598',
    '13902250770', '13518081834',
    '15989063186', '13303469484', '15966644444', '18198348820', '18609885908',
    '15013919867', '18871821666',
    '13738479641', '15802728789', '13007777511', '18675555485', '18907111861',
    '13820536199', '18986561986',
    '13667365566', '13971490856', '13060830692', '18670761552', '18301567857',
    '17688382261', '18689506159',
    '13422225418', '15039026971', '18603018035', '15013867610', '18617180360',
    '13007143404', '18027824128',
    '13027437288', '18327585808', '15546973737', '15838011711', '18682457205',
    '15973475098', '13905515597',
    '18603325251', '17875392363', '13530984760', '18688299712', '13828425515',
    '13602944400', '18188301444',
    '13825110480', '13087088052', '18601293006', '15366216696', '13590927658',
    '15197110713', '18295486579',
    '13709020406', '13580333335', '15959622071', '13713971570', '13505580261',
    '13949869499', '15926314257',
    '18819817812', '18893131118', '13679440226', '15569699984', '13510031853',
    '13940837809', '15140438001',
    '18948193566', '13467006271', '15335836000', '13821312883', '15334074892',
    '18978933099', '15875500108',
    '13219786110', '13307498733', '18154623703', '13539781622', '13177440789',
    '13820969847', '13662189874',
    '13555998227', '18255382077', '13691697320', '17704042726', '18655190218',
    '18008643682', '13178388777',
    '18963999102', '18656334843', '13634264125', '17713417690', '13699039112',
    '15853901969', '18028089890',
    '18972004251', '13907154184', '15989536711', '13919058195', '13644771281',
    '13336063025', '17095079019',
    '13759980479', '17701133740', '13910189052', '15131064363', '13538034283',
    '15588116520', '15935071979',
    '13360507072', '15238075211', '13670074440', '15992478282', '13662643171',
    '18523980190', '15140173377',
    '18700415944', '13265674680', '15235633977', '18576741027', '15375367362',
    '15820429858', '17873784392',
    '17767731311', '17767766742', '13305507666', '18028536740', '13866759392',
    '18343033765', '13331753870',
    '18844185012', '18004439395', '18040048969', '13464422138', '18643074761',
    '18604320196', '18309206122',
    '17786149155']

select_user_id_sql = """
    select id, wx_openid from user where mobile=:mobile
"""

update_pack_sql = """
    update pack set bid_point=bid_point+50 where uid=:uid
"""

for each in mobile_list:
    user = session.execute(
        select_user_id_sql,
        {'mobile': each}
    ).fetchone()
    if user:
        session.execute(
            update_pack_sql,
            {'uid': user.id}
        )
        if user.wx_openid:
            redis_client.sadd(MARCH_WXUSERS, each)
session.commit()
session.close()
